﻿CREATE TABLE [dbo].[DiagnosticsInfrastructureLogEntry] (
    [DiagnosticsInfrastructureLogEntryRowId] INT           IDENTITY (1, 1) NOT NULL,
    [RoleRowId]                              INT           NOT NULL,
    [DiagnosticsInfrastructureFunctionRowId] INT           NOT NULL,
    [DateTimeUTC]                            DATETIME      NOT NULL,
    [Line]                                   INT           NOT NULL,
    [MDRESULT]                               INT           NOT NULL,
    [ErrorCode]                              INT           NOT NULL,
    [ErrorCodeMessage]                       VARCHAR (MAX) NOT NULL,
    [InstanceNumber]                         INT           NOT NULL,
    [EventLevel]                             SMALLINT      NOT NULL,
    [Message]                                VARCHAR (MAX) NOT NULL,
    CONSTRAINT [PK_DiagnosticsInfrastructureLogEntryRowId] PRIMARY KEY CLUSTERED ([DiagnosticsInfrastructureLogEntryRowId] ASC)
);

